package module

import (
	"fmt"
	"time"

	"gitee.com/shijingzhao/go-frame/module/pb"
)

type Airth struct{}

func (a *Airth) ArithAddHandlerRpc(rq *pb.ArithRequest, rs *pb.ArithResponse) error {
	rs.C = rq.A + rq.B
	fmt.Println(time.Now().Format("2006-01-02 15:04:05.000000"), "ArithAddHandlerRpc", rq, rs)
	return nil
}

func (a *Airth) ArithSubHandlerRpc(rq *pb.ArithRequest, rs *pb.ArithResponse) error {
	rs.C = rq.A - rq.B
	fmt.Println(time.Now().Format("2006-01-02 15:04:05.000000"), "ArithSubHandlerRpc", rq, rs)
	return nil
}
